<script>
function goPrint(){
	location.href="../posts/printmy";
}
</script>

<!-- Reflection -->
<?php //$javascript->link('reflection', false); ?>
<!-- End Reflection -->
<!-- Gallery -->
<?php $javascript->link('jquery-1.3.2.min', false); ?>
<?php $javascript->link('slimbox2', false); ?>
<?php echo $html->css('slimbox2',false);  ?>
<!-- End Gallery -->
<table>
<?php if($posts!=null){?>
<?php foreach($posts as $post){ ?>

	<tr>
		<td>
			<?php 
				if(isset($post['Image'][0]['Thumbnail']["path_big"]))
					echo $html->link($html->image($post['Image'][0]['Thumbnail']["path_big"]),"../img/".$post['Image'][0]['path'],array("rel"=>"lightbox", 'title'=>$post['Post']["title"]."<br>".$post['Post']["description"],'escape'=>false));
				else 
					echo $html->image("no_image.gif", array('width'=>200, 'height'=>200));
			?>
		</td>
		<td><?php echo $html->link($post['Post']["title"],array("controller"=>"posts","action"=>"view",$post["Post"]["id"])); ?>
			<br>
			<?php echo $post["Post"]["address"]; ?>
			<br>
			<?php echo $post["Post"]["description"]; ?>
		</td>
		<td><?php echo $html->link("Delete",array("controller"=>"posts","action"=>"deleteRoute",$post['Post']["id"],$post['Post']["title"]),null, sprintf(__('Are you sure you want to delete \'%s\' of Your Route?', true), $post['Post']['title']));?></td>
	</tr>
<?php } ?>
</table>
<br>
<?php echo $html->link("Print",array("controller"=>"posts","action"=>"printmy"),array("target"=>"blank")); ?>
<?php }else{ echo "You don't have any place saved yet"; }?>

